var mongoose = require('mongoose')

var Schema = mongoose.Schema  //可用于定义数据表结构的对象

var travelSchema = new Schema({  //定义一个数据表实例
  "id": Number,
  "title": String,
  "author": Object,
  "tagList": Array,
  "content": String,
  "pictureNumber": String,
  "commentNumber": String,
  "viewNumber": String,
  "imageUrl": String,
  "jumpUrl": String
})

var travelModel = mongoose.model('travel',travelSchema) //定义一个用于操作数据表的模型对象

module.exports = travelModel  //导出方法，别的js文件才能调用